/*
** init_env.c for  in /home/faye_m//zappy-2011/new_server
** 
** Made by mouhamed faye
** Login   <faye_m@epitech.net>
** 
** Started on  Sun Jul  3 18:09:31 2011 mouhamed faye
** Last update Sun Jul 10 11:57:56 2011 mouhamed faye
*/
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <strings.h>
#include <stdio.h>
#include <stdlib.h>
#include "types.h"

void    init_env(T_env *e, t_server_params *params)
{
  FD_ZERO(&e->master);
  FD_ZERO(&e->read_fds);
  FD_ZERO(&e->write_fds);
  e->fdmax = 0;
  e->listener = 0;
  e->nbytes = 0;
  e->yes = 1;
  e->addrlen = 0;
  e->i = 0;
  e->j = 0;
  e->server_params = params;
  e->port = params->port;
  bzero(e->buf, 2048);
}
